package org.intelli.dl.learn.order.feign;

import org.intelli.dl.learn.model.product.Product;
import org.intelli.dl.learn.order.feign.fallback.ProductFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author: Michael
 * @date: 2025/4/21
 * @desc:
 */
@FeignClient(value = "service-product", fallback = ProductFeignClientFallback.class)   // Feign 客户端
public interface ProductFeignClient {

    static final String BASE_PATH = "/api/product";

    @GetMapping(BASE_PATH + "/getProductById/{id}")
    Product getProductById(@PathVariable("id") Long productId);

}
